home *** CD-ROM | disk | FTP | other *** search
/ HaCKeRz Kr0nlcKLeZ 1 / HaCKeRz Kr0nlcKLeZ.iso / emulator / coleco / 8080.txt < prev    next >
Encoding:
Text File  |  1996-04-29  |  5.0 KB  |  130 lines

  1.  
  2. Summary of 8080 Instructions
  3. ------- -- ---- ------------
  4.  
  5. Abbreviations used in this Summary:
  6.  
  7.       R       Any of the 8-Bit registers A,B,C,D,E,H,L.
  8.       data    Any 8-bit or 16-bit value.
  9.       PC      Program Counter.
  10.       SP      Stack Pointer.
  11.       RM      Register A,B,C,D,E,H,L or memory M pointed by HL.
  12.       BD      Either register pair BC or DE  (B=BC, D=DE).
  13.       BP      Any byte pair symbol (B=BC, D=DE, H=HL, PSW=AF).
  14.       RP      Any register pair (B=BC, D=DE, H=HL, SP=SP).
  15.       Addr    A 16-Byte address.
  16.  
  17. 8-Bit Transfers
  18.  
  19. MOV   RM1,RM2     Moves data from one register to another.
  20. MVI   RM,data     Puts 8 bits into register, or memory.
  21. LDA   Addr        Puts 8 bits at location Addr into A Register.
  22. STA   Addr        Stores 8 bits at location Addr.
  23. LDAX  BD          Loads A register with 8 bits from location in BC or DE.
  24. STAX  BD          Stores A register at location in BC or DE.
  25.  
  26. 16-Bit Transfers
  27.  
  28. LHLD  Addr        Loads HL register with 16 bits found at Addr and Addr+1.
  29. SHLD  Addr        Stores HL register contents at Addr and Addr+1.
  30. LXI   RP,data     Loads 16 bits into B,D,H, or SP.
  31. PUSH  BP          Puts 16 bits of BP onto stack. SP=SP-2.
  32. POP   BP          Takes top of stack, puts it in BP. SP=SP+2.
  33. XTHL              Exchanges HL with top of stack.
  34. SPHL              Puts contents of HL into SP (stack pointer).
  35. PCHL              Puts contents of HL into PC (program counter) [=JMP (HL].
  36. XCHG              Exchanges HL and DE.
  37.  
  38. 8-Bit Arithmetic
  39.  
  40. ADD   RM          Adds contents of register R to A register.
  41. SUB   RM          Subtracts contents of register R from A register.
  42. INR   RM          Increments register R by one.  R=R+1.
  43. DCR   RM          Decrements register R by one.  R=R-1.
  44. CMP   RM          Compares contents of R with A register.
  45. ANA   RM          Logically ANDs contents of R with A register.
  46. ORA   RM          Logically ORs contents of R with A register.
  47. XRA   RM          Exclusive-OR contents of R with A register.
  48.  
  49. ADI   data        Adds 8 bit data to contents of A register.
  50. SUI   data        Subtracts 8 bit data from contents of A register.
  51. CPI   data        Compares 8 bit data with contents of A register.
  52. ANI   data        Logically ORs 8 bit data with contents of A register.
  53. ORI   data        Logically ORs 8 bit data with contents of A register.
  54. XRI   data        Exclusive-OR 8 bit data with A register.
  55.  
  56. DAA               Convert A register to packed Binary Coded Decimal.
  57. ADC   RM          Add with carry.
  58. ACI   data        Add with carry immediate.
  59. SBB   RM          Subtract with borrow.
  60. SBI   data        Subtract with borrow immediate.
  61.  
  62. 16-Bit Arithmetic
  63.  
  64. DAD   RP          Adds contents of register RP to contents of HL register.
  65. INX   RP          Increments register RP.
  66. DCX   RP          Decrements register RP.
  67.  
  68. Jumps, Calls, and Returns
  69.  
  70. JMP   Addr        Unconditional Jump to location Addr.
  71. CALL  Addr        Unconditional Subroutine call to location Addr.
  72. RET               Unconditional return from subroutine.
  73.  
  74.        Conditional variations
  75.  
  76.        Flag condition          Jump         Call         Return
  77.        --------------          ------       ------       ------
  78.         Nonzero                JNZ          CNZ          RNZ
  79.         Zero                   JZ           CZ           RZ
  80.         No Carry               JNC          CNC          RNC
  81.         Carry                  JC           CC           RC
  82.         Parity Odd             JPO          CPO          RPO
  83.         Parity Even            JPE          CPE          RPE
  84.         Plus                   JP           CP           RP
  85.         Minus                  JM           CM           RM
  86.  
  87. Rotations
  88.  
  89. RAL               Rotate Accumulator Left:  Bit0=C  C=Bit7.
  90. RAR               Rotate Accumulator Right:  Bit7=C  C=Bit0.
  91. RLC               Rotate Accumulator Left thru Carry:  Bit0=Bit7  C=Bit7.
  92. RRC               Rotate Accumulator Right thru Carry:  Bit7=Bit0  C=Bit0.
  93.  
  94. Other Instructions
  95.  
  96. IN    Port        Data from Port placed in A register.
  97. OUT   Port        Data from A register placed in Port.
  98.  
  99. CMC               Complement Carry Flag.
  100. STC               Set Carry Flag = 1.
  101. CMA               Complement A register.
  102.  
  103. HLT               Halt CPU and wait for interrupt.
  104. NOP               No operation.
  105.  
  106. DI                Disable Interrupts.
  107. EI                Enable Interrupts.
  108.  
  109. RST 0             Call 0000H.
  110. RST 1             Call 0008H.
  111. RST 2             Call 0010H.
  112. RST 3             Call 0018H.
  113. RST 4             Call 0020H.
  114. RST 5             Call 0028H.
  115. RST 6             Call 0030H.
  116. RST 7             Call 0038H.
  117.  
  118. Assembler Directives
  119.  
  120. ORG   Addr        Begin Assembly at Addr.
  121. END               Causes Assembly to End.
  122. EQU   Addr        Define symbolic label.  A label name must precede EQU.
  123.                   (For example, BDOS EQU 05H.)
  124. SET   Exp         Set numeric constant.
  125. IF    Exp         Conditional Assembly, if Exp<>0.
  126. ENDIF             End of Conditional Assembly.
  127. DB    List        Define Bytes. May be Hex, ASCII, etc.
  128. DW    List        Define Words. May be Hex, ASCII, etc.
  129. DS    Exp         Define Storage of length Exp.
  130.